<template>
	<view @click="getSelect" class="bg-white flex p-l-44 p-t-32 p-r-38 p-b-20 m-t-20" style="border-radius: 10upx;align-items: baseline;box-shadow: 0px 0px 6px 3px rgba(230, 229, 229, 100);">
		<view class="m-r-28">
			<u-icon name="map-fill" color="#E85631" size="44" ></u-icon>
		</view>
		<view class="">
			<view class="xxl bold">
				{{item.address}}
			</view>
			<view class="m-t-8 sm top-color">
				{{item.province}}{{item.city}}{{item.district}}
			</view>
			<view class="m-t-4 top-color sm">
				{{item.contact}}{{item.telephone}}
			</view>
			<view class="m-t-14 text-right" style="width: 565upx;">
				<view class="bottom-btn m-r-20" @click="edit(item.id)" >
					编辑
				</view>
				<view class="bottom-btn" @click.stop="del(item.id)">
					删除
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"address-book",
		data() {
			return {
				
			};
		},
		props:['item','index','select'],
		methods:{
			getSelect(){
				if(this.select!==0){
					
					uni.$emit('addressSelect',this.item)
					uni.navigateBack({
						
					})
				}
				
			},
			del(id){
				this.$emit('del',id)
			},
			edit(id){
				uni.navigateTo({
					url:"/bundle/pages/address_book_add/address_book_add?id="  + id
				})
			}
		}
	}
</script>

<style lang="scss">
	$topColor:#9D9D9D;
	$firstColor:#515050;
	.top-color{
		color: $topColor;
	}
	.first-color{
		color: $firstColor;
	}
	.bottom-btn{
		width: 116upx;
		height: 52upx;
		line-height: 52upx;
		border-radius: 8upx;
		color: rgba(81, 80, 80, 100);
		border: 1px solid rgba(208, 208, 208, 92);
		text-align: center;
		display: inline-block;
		font-weight: bold;
	}
</style>
